home *** CD-ROM | disk | FTP | other *** search
- /*[a-,body+,h-,o=100,r+,rec+,t=4,u+,#+,j=20/57/1$,n-]*/
- /*ULoMem.p*/
- /*Copyright © 1988-1990 by Apple Computer Inc. All rights reserved*/
-
- /* This unit provides a friendly interface to low memory variables (see Inside Macintosh.) The
- global "routines" are, in fact, inline functions which directly access the low memory
- variables. */
- #ifndef __ULoMem__
- #define __ULoMem__ 0
- #endif
- #if ! __ULoMem__
- #define __ULoMem__ 1
- #ifndef __SYSEQU__
- #include "SysEqu.h"
- #endif
- #ifndef __DEVICES__
- #include "Devices.h"
- #endif
-
- /*------------------------------------------------------------------------------------
- NOTE: + = ROM128K or newer
- ------------------------------------------------------------------------------------*/
- /* This are needed for the non script manager case...*/
- const short kLMApFontID = 0x984; /* Integer - Resource ID of application font
- */
- const short kLMSysFontFam = 0xBA6; /*+ System font family ID or zero */
- const short kLMSysFontSize = 0xBA8;
- /*+ System font size (or zero for 12 point) */
- const short kLMTESysJust = TESysJust;
- /*+ System font size (or zero for 12 point) */
- /* To here */
-
- const short kLMHiliteMode = HiliteMode; /* Clr bit seven to make next QD Op use
- selection color */
- const short kLMExTable = 0x00; /* Address of exception vector table */
-
- /* for ROMMapInsert */
- const short kLMmapTrue = - 1;
- const short kLMmapFalse = 0;
- /* The following constants are instructions used in the various inline functions. */
- const short kMoveLImmed = 0x2EBC; /* MOVE.L of immediate data to (SP) */
- const short kMoveBAbsolute = 0x1EB8;
- /* MOVE.B of absolute Address data to (SP) */
- const short kMoveWAbsolute = 0x3EB8;
- /* MOVE.W of absolute Address data to (SP) */
- const short kMoveLAbsolute = 0x2EB8;
- /* MOVE.L of absolute Address data to (SP) */
- /* for GetUTableBase */
- typedef DCtlHandle UnitTable[129];
- typedef UnitTable *UnitTablePtr;
-
- typedef RgnHandle *RgnHandlePtr;
-
- pascal CursPtr GetTheCrsr(void)
- = {0x2ebc/* kMoveLImmed*/, 0x0000,0x0844/* TheCrsr*/}; /* MOVE.L #TheCrsr,(SP) */
-
- pascal RgnHandlePtr GetSaveVisRgnPtr(void)
- = {0x41F8, 0x09F2, 0x2E88}; /* LEA $9f2, A0 MOVE.L A0,(SP) */
-
- pascal short GetLMMBarHeight(void)
- = {0x3eb8/* kMoveWAbsolute*/, 0xBAA}; /* MOVE.W MBarHeight,(SP) ??? symbolic name
- in MPW 3.1 */
-
- pascal Ptr GetCurStackBase(void)
- = {0x2eb8/* kMoveLAbsolute*/,0x0908/* CurStackBase*/}; /* MOVE.L CurStackBase,(SP) */
-
- pascal short GetHwCfgFlags(void)
- = {0x3eb8/* kMoveWAbsolute*/, 0xB22}; /* MOVE.W $B22,(SP) */
-
- pascal GrafPtr GetWindowList(void)
- = {0x2eb8/* kMoveLAbsolute*/,0x09d6/* WindowList*/}; /* MOVE.L #WindowList,(SP) */
-
- pascal short GetFSFCBLen(void)
- = {0x3eb8/* kMoveWAbsolute*/, 0x3F6}; /* MOVE.W $3F6,(SP) */
-
- pascal short GetCurJTOffset(void)
- = {0x3eb8/* kMoveWAbsolute*/,0x0934/* CurJTOffset*/}; /* MOVE.W CurJTOffset,(SP) */
-
- pascal short GetUnitNtryCnt(void)
- = {0x3eb8/* kMoveWAbsolute*/,0x01d2/* UnitNtryCnt*/}; /* MOVE.W UnitNtryCnt,(SP) */
-
- pascal UnitTablePtr GetUTableBase(void)
- = {0x2eb8/* kMoveLAbsolute*/,0x011c/* UTableBase*/}; /* MOVE.L UTableBase,(SP) */
-
- pascal SignedByte GetCrsrBusy(void)
- = {0x1eb8/* kMoveBAbsolute*/,0x08cd/* CrsrBusy*/}; /* MOVE.B CrsrBusy,(SP) */
-
- pascal Ptr GetROMMapInsert(void)
- = {0x2ebc/* kMoveLImmed*/, 0x0000,0x0b9e/* RomMapInsert*/}; /* MOVE.L #ROMMapInsert,(SP) */
-
- pascal Handle GetMenuList(void)
- = {0x2eb8/* kMoveLAbsolute*/, 0xA1C}; /* MOVE.L $A1C,(SP) */
-
- pascal Handle GetGZMoveHnd(void)
- = {0x2eb8/* kMoveLAbsolute*/,0x0330/* GZMoveHnd*/}; /* MOVE.L GZMoveHnd,(SP) */
-
- pascal Handle GetGZRootHnd(void)
- = {0x2eb8/* kMoveLAbsolute*/,0x0328/* GZRootHnd*/}; /* MOVE.L GZRootHnd,(SP) */
-
- pascal Boolean GetResLoad(void)
- = {0x1eb8/* kMoveBAbsolute*/,0x0a5e/* ResLoad*/}; /* MOVE.B ResLoad,(A7) */
- /* Returns the ResLoad flag from low memory. True indicates that resources
- are loaded on GetResource. */
-
- #endif /* __ULoMem__ */
-
-